<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean id="user" class="entity.User" scope="session"/>
<jsp:useBean id="pendingUsers" class="java.util.ArrayList" scope="request"/>
<html>
	<head>
		<title>Recreation Manager - Nektivirani korisnici</title>
		<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="theme.css">
		<script type="text/javascript" src="scripts/linkfader.js"></script>
	</head>
	<c:if test="${user.type!='A'}">
		<c:redirect url="./login.jsp" />
	</c:if>
	<body>
	<center>
	
	<c:import url="./header.jsp"></c:import>
	<table class="mainTable">
		<tr>
			<td width="200px" valign="top">
				<c:import url="./menu.jsp"></c:import>
			</td>			
			<td valign="top">
			<!-- itt kezdodik -->
				<c:if test="${empty pendingUsers}">
					<table class="list">
						<thead>
							<tr>
								<td><h2>Korisnici koji nisu aktivirani</h2></td>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td><h3>Trenutno nema neaktiviranih korisnika</h3></td>
							</tr>
						</tbody>
					</table>
				</c:if>
				<c:if test="${!empty pendingUsers}">
					<table class="list">
						<thead>
							<tr>
								<td colspan="6"><h2>Korisnici koji nisu aktivirani</h2></td>
							</tr>
							<tr>
								<th>Ime:</th>
								<th>Prezime:</th>
								<th>E-mail adresa:</th>
								<th>Broj telefona:</th>
								<th>Aktiviranje:</th>
								<th>Brisanje:</th>						
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${pendingUsers}" var="usr">
								<tr>
									<td>${usr.firstName}</td>
									<td>${usr.lastName}</td>
									<td>${usr.email}</td>
									<td>${usr.phone}</td>
									<td><a href="./ActivateUser?idUsr=${usr.userId}">Aktiviranje</a></td>
									<td><a href="./DeleteUser?idUsr=${usr.userId}">Brisanje</a></td>						
								</tr>
							</c:forEach>	
						</tbody>
					</table>
				</c:if>
			<!-- itt vegzodik -->
			</td>
		</tr>
	</table>
	
	</center>
	</body>	
</html>